/*
** init_args_noargs.c for dayday in /home/dd/projs/dayday/srcs/client/common
** 
** Made by dd
** Login   <alletr_p@epitech.net>
** 
** Started on  Tue Jul 21 21:58:14 2009 dd
** Last update Tue Jul 21 22:24:45 2009 dd
*/

#include <assert.h>

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#include <string.h>
#endif

#include "client.h"

int		init_args_noargs(t_all *all, char *args)
{
  int		i;
  int		noarg;
  extern t_args	gl_noargs[];

  assert(all && args);
  noarg = 0;
  for (i = 0; gl_noargs[i].opt; i++)
    {
      if (!strchr(args, gl_noargs[i].opt))
	{
	  gl_noargs[i].f(all);
	  noarg = 1;
	}
    }
  if (noarg == 1)
    print(USAGE);
  return (SUCCESS);
}
